<?php
header("content-type:text/html;charset:utf-8");
require_once 'mysql.class.php';
$mysql = new MySQL('localhost','cms_mysql','asdw4466','cms_mysql');
/**
 *
 */
class view{
  function index()
  {
    global $mysql;
    $data = $mysql->table('sv_post_info')->order('id desc')->select();
    for($i=0;$i!=count($data);$i++){
      echo "<h2 class='post_title'>{$data[$i]['title']}</h2><div class='post_content'>{$data[$i]['content']}</div>";
    }
  }
  function post($id)
  {
    global $mysql;
    $data = $mysql->table('test')->where('id='.$id)->select();
    print_r($data);
  }
}

?>
